Generating a Web Service Operation on an Object Template |
|
Note Object Template is deprecated in Cordys BOP 4.1. Use WS-AppServer Custom class instead. Refer to Using WS-AppServer Custom Class as an Alternative to Object Template for more information on the procedure and guidelines to use WS-AppServer Custom Class as an alternative to Object Template. |
Before you begin this task:
You must already have created an object template.
You can generate Web service operations on an object template in Process Platform using the Web service wizard and use them in a process or a web page to offer specific functionality to users.
Note:
Method Sets are being referred as Web service Interfaces and Methods are referred as Web service Operations.
- From the Workspace Documents (Explorer), right-click your project and select New > Other. The New Process Platform Document window appears.
- Click (Web Service) from the New Process Platform Document window. The Untitled Web Service - Web Service wizard is displayed.
- Click Select the Source drop-down box, select Object Template from the list.
- Provide the appropriate name, description, and namespace for the Web service operation in the respective text boxes of the wizard.
- Click Next The next page on the wizard is displayed.
- Click next to the Select an Object Template field, select the required object template from the Select the Object Template dialog box that appears and click OK. The name of the selected object template is displayed in the Select an Object Template field.
- Type the names for Web service interface and Web service operations in the Web Service Interface Name and Web Service Operations Name in the respective fields of the Web Services Interface Information group box and click Next. The next page of the wizard is displayed.
- Do the following in the Method Definitionsection:
- The name of the Web service operation is displayed automatically in the Name field.
- Select version from the Versionlist box.
Note:
If you want the version tag to be included in the SOAP request of the Web service, select True from the Version list box. Including the version tag in the SOAP request will enable you to specify the space (Organization, User, or ISV) from where the objects need to be retrieved. If you set the version to False, then the SOAP request will not contain the version tag, and objects will be searched in all the three spaces. By default, this value will be False. - Select metadata from the Metadatalist box.
Note:
If you want the metadata of the object to be included in the response of the SOAP request, select True from the Metadata list box. By default, this value will be False. - Build the required expression for the Web service operation by dragging the required special attributes and operators from the Special Attributes, and Operators folders respectively, to the Implementation text box.
- Click Finish. A Web service Properties page appears, displaying the target namespace, its prefix and the location URI in the Target Namespace, TNS Prefix and Location URI fields.
The object template can now be used as a Web service operation and is displayed under Workspace Documents (Explorer) > <project>folder.Note:
- Right-click the required <Web service operation> in Workspace Documents (Explorer) and click Publish to Organizationto make it available to an organization. If you do not specify the organization, it is published to the default organization that is set for the authenticated user.
- Open Workspace Documents (Explorer) > <project>, and double-click the just created Web service Interface. In the Web Service Binding Properties pane that appears, select CoBOC from the Service Group drop-down list. This will bind the Webservice interface to the Service group.
- Alternatively, you can attach the Web service to the CoBOC Service Group at runtime. Refer to Attaching Web Service Interface to a Service Group for more information on the procedure to attach a Web service interface to a service group.
- Right-click the required <Web service operation> in Workspace Documents (Explorer) and click Publish to Organizationto make it available to an organization. If you do not specify the organization, it is published to the default organization that is set for the authenticated user.